<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript" src="demo.js"></script>
</head>

<body>
      <form >
            <input type="checkbox" name="interest" id=""/><label >游泳</label>
            <input type="checkbox" name="interest" id=""/><label >看电影</label>
            <input type="checkbox" name="interest" id=""/><label >看书</label>
            <input type="checkbox" name="interest" id=""/> <label >听音乐</label>
            <input type="button" id="btn1" value="全选" onclick="checkInterest()">
           
            <input type="button" value="反选" onclick="checkInterest1()">
      </form>
</body>
</html>